Security News
The Risks of Misguided Research in Supply Chain Security
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
@cloudflare/component-link
Advanced tools
Cloudflare Link Component
Installation with yarn is recommended
$ yarn add @cloudflare/component-link
import React from 'react';
import { Link } from '@cloudflare/component-link';
class LinkComponent extends React.Component {
constructor(props) {
super(props);
this.state = {
isActive: false
};
}
handleClick() {
console.log('handleClick!');
}
handleExpandedClick() {
this.setState({ isActive: !this.state.isActive });
}
render() {
return (
<div>
<p>
Create a <code>Link</code> with a <code>to</code> prop:
</p>
<Link to="/">Link to /</Link>
<p>
Alternatively you can pass an <code>onClick</code> handler:
</p>
<Link onClick={this.handleClick.bind(this)}>Link to something</Link>
<p>{`Note: This will give it a role="button"`}</p>
<p>
All additional props will be added to the <code>Link</code> element:
</p>
<Link to="/foo">Link to /foo</Link>
<p>You can create an expandable link by giving it an expandable prop</p>
<Link
onClick={this.handleExpandedClick.bind(this)}
isActive={this.state.isActive}
expandable
>
Link to /foo
</Link>
</div>
);
}
}
export default LinkComponent;
FAQs
Cloudflare Link Component
The npm package @cloudflare/component-link receives a total of 9,070 weekly downloads. As such, @cloudflare/component-link popularity was classified as popular.
We found that @cloudflare/component-link demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 35 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.